import axios from '@/libs/api.request'

//登录
export const login = ({ userName, password }) => {
  const data = {
    userName,
    password
  }
  return axios.request({
    url: 'login',
    data,
    method: 'post'
  })
}

//退出登录
export const logout = (token) => {
  const data = {
    token
  }
  return axios.request({
    url: 'logout',
    data,
    method: 'post'
  })
}

//获取管理用户信息
export const adminInfo = (token) => {
  return axios.request({
    url: 'admin',
    params: {
      token
    },
    method: 'get'
  })
}

